package com.training.java.interfaces;


public class AnimalDemo {

	public static void main(String[] args) {
		
		Animal pig = new Pig("Medium Size","Pig","OINK",false,"Grass","Slow",7);
		Animal kitty = new Cat("Small Size","Cat","meow",false,"Milk","Very Slow",14);
		Animal elephant =new Elephant("Very Big  Size","Elephant","Trumpeting",false,"peanuts","slow",8);
		Animal puppy =new Dog("small  Size","Puppy","Barking",false," Dog Food","Fast",8);
		
		//calling the method animaldo
		animalDo(pig);
		animalDo(kitty);
		animalDo(elephant);
		animalDo(puppy);
		

}
	//take the parameter and execute  the methods according to given (animal reference) parameter
	

	public static void animalDo(Animal animal)

	
	{
		animal.eat();
		animal.walk();
		animal.sleep();
	
	}
}
	